-
Notifications
You must be signed in to change notification settings - Fork 3
View now extends GenTraversableOnce. #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This should allow views to be used inside flatMap operations. We assume this is ok because GenTraversaleOnce has NO implementations of any methods, so we need to always provide our own implementations. TODO - We should check to see if GenTraversable[E] makes more sense to extend. That one has a view issues in terms of what it assumes (e.g. ).
|
This change solves the problem of signature of We already have several other implementations of collections: This is why I believe that in long term proposal: is better, as it simply works with Java Streams, standard collections, @paulp collections. It would also work with off-heap arrays https://github.com/densh/scala-offheap. It does not need to be modified to support any new collections libraries, be it standard or non-standard. Unlike this, using If somebody whats to integrate with this Views library, he will need to provide a conversion from his collection types to Even in this PR we have a big problem created by integrating with Note that this also breaks idea of making forcing methods obvious to see from code, as most common methods will be inherited. No |
|
@jsuereth @DarkDimius Making views work with off-heap arrays is a complicated matter due to the fact that there is no such thing as instance of |
|
@DarkDimius SO. to your points ->
SO, I understand the hesitation to lock down on anything out of hte current collection API. |
|
@jsuereth I do agree that if we need to extend current collection framework than |
This should allow views to be used inside flatMap operations.
We assume this is ok because GenTraversaleOnce has NO implementations of any methods, so we
need to always provide our own implementations.
TODO - We should check to see if GenTraversable[E] makes more sense to extend. That one
has a few issues in terms of what it assumes (e.g.
repr).Review/Comments/Thoughts by @DarkDimius @Ichoran @SethTisue